#ifndef SQLIST_H
#define SQLIST_H
#endif

#include <stdint.h>
#define MAX_SIZE 100

typedef struct {
	void *data;
	uint32_t len;
} Sqlist;

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*Create_list)(Sqlist *list, int size);
typedef void (*Destroy_list)(Sqlist *list);

int init_sqlist(Sqlist *, Create_list, int);
int destroy_sqlist(Sqlist *, Destroy_list);
int clear_sqlist(Sqlist *);
int is_sqlist_empty(Sqlist *);
int len_of_sqlist(Sqlist *);
int get_elem(Sqlist *, int, void *);
int locate_elem(Sqlist *, int *, void *);
int prior_elem(Sqlist *, void *, void *);
int next_elem(Sqlist *, void *, void *);
int insert_elem(Sqlist *, int, void *);
int delete_elem(Sqlist *, int, void *);

#ifdef __cplusplus
}
#endif
